package cn.kwq.project_manger.service.impl;

import cn.dev33.satoken.stp.StpInterface;
import cn.kwq.project_manger.repostitory.RoleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StpCheckRoleImpl implements StpInterface {
    @Autowired
    RoleRepository roleRepository;

    //获取权限集合
    @Override
    public List<String> getPermissionList(Object userId, String s) {
        return null;
    }

    //获取角色集合
    @Override
    public List<String> getRoleList(Object userId, String s) {
        return roleRepository.findRoleByUserId((Long) userId);
    }
}
